home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / intrfc62.zip / INTRFC.DOC < prev    next >
Text File  |  1991-06-14  |  5KB  |  126 lines

  1. INTRFC - Program to dump TPU files. (June, 1991)
  2.  
  3. Version 1.32:  Dumps TP 6.0 and TPW 1.0 format files.
  4.  
  5. Written for the public domain by D.J. Murdoch (CIS 71631,122,
  6. Fidonet 1:221/177.40, or Internet dmurdoch@watstat.waterloo.edu.)
  7.  
  8. INTRODUCTION
  9.  
  10.      I started INTRFC because I got a library of Turbo Pascal 4.0
  11. subroutines which had some errors in the documentation.  One of the
  12. functions wanted its arguments to be a special type, but the doc's
  13. didn't tell me which one.  TP gave me an error message saying I wasn't
  14. using the right type, but wouldn't tell me which one to use either.  I
  15. decided to decode the TPU file and figure out what TP wanted.  Once I
  16. got started, it was hard to stop. So, I ended up writing INTRFC, which
  17. printed out almost all the information you'll ever need about the
  18. interface to a TPU unit.
  19.  
  20.      When I upgraded INTRFC to TP 5.5 files, I got carried away again.
  21. Version 1.2 dumped the complete file, not just the interface section.
  22.  
  23.      The release of TP 6.0 made it necessary to upgrade again. This one
  24. was easy:  there aren't very many differences between version 5.5 and
  25. 6.0 .TPU files.  I decided to fill in a couple of gaps in version 1.2,
  26. and the current one dumps everything in the file. However, I made a few
  27. mistakes in release 1.3; version 1.31 fixed those.
  28.  
  29.      Finally, TP for Windows, version 1.0, came out.  I was amazed when
  30. version 1.31 almost worked; it turns out that the file format for TP6
  31. and TPW1 is identical.  There were a few errors in INTRFC 1.31 because
  32. some of the Windows features had never showed up; the current release,
  33. version 1.32, fills in those areas.  I also cleaned up the display a
  34. bit.
  35.  
  36.      Because of the way INTRFC has been written, i.e. entirely by
  37. guesswork, there are probably special cases that it doesn't handle
  38. properly.  That's one reason the source code is there - so other people
  39. can fix up my mistakes.  (And if you do, please tell me - reports from
  40. users are how I found the bugs that version 1.31 fixed.)
  41.  
  42.      The other reason I included source code is because it will serve as
  43. a bit of documentation for the TPU file format:  Borland will never
  44. publish it.  They want to be free to change the format, tweaking
  45. performance when they can.  (As you'll see if you study the .TPU design,
  46. the famous "obsolete .TPU" problem doesn't come from the frequent format
  47. changes; it's basic to the .TPU design itself. References to old SYSTEM
  48. and other units just can't be updated.)
  49.  
  50.      I hope others who may want to do completely different things to a
  51. TPU file will benefit from reading the source.  One difficulty they're
  52. likely to have with a program written the way this one was is that
  53. comments are almost non-existent.  If you have any short questions about
  54. it that you can't figure out, send them to me at one of the addresses
  55. above.
  56.  
  57. USAGE:
  58.         INTRFC /options unit
  59.    where options are letters from the following:
  60.       B - emitted code Bytes
  61.       C - initialized Constant blocks
  62.       D - coDe blocks
  63.       E - routine Entry records
  64.       G - emitted Global const bytes
  65.       H - TPU Header
  66.       I - Implementation section (if $D was used in compilation)
  67.       L - proc/fn Locals (if $L was used in compilation)
  68.       M - source line number map
  69.       N - Names in interface
  70.       O - Object VMT records
  71.       R - Relocation records
  72.       S - Source file records
  73.       U - Unit list
  74.       V - Var blocks
  75.       W - Windows DLL list
  76.       A - turn All options on
  77.       Tpath - set the Turbo directory, where the TURBO.TPL and referenced
  78.               units are kept
  79.  
  80.    Options are processed sequentially and toggle the display.
  81.    E.G. To see all but the relocation records in the system unit, use
  82.       INTRFC /AR /T\turbo SYSTEM
  83.    The default is just the names in the interface section.
  84.  
  85. LIMITATIONS
  86.  
  87.     There are tons of limitations to INTRFC.  It doesn't know how
  88. to print any but the simplest types of constants.  It won't print the
  89. values of typed constants. Etc. Etc. Etc.  If you want it to do
  90. something differently just go ahead and change it!  I recommend
  91. compiling with all possible checks turned on, since it's pretty easy to
  92. get lost in all those pointers.
  93.  
  94. FILES
  95.  
  96. The following files should be included in this package.
  97.  
  98. INTRFC   DOC    This file
  99. TPU9     DOC    TPU structure outline
  100. INTRFC   EXE    The executable
  101.  
  102. INTRFC   PAS    Main program
  103. GLOBALS  PAS    Program globals
  104.  
  105. HEAD     PAS    TPU header dumper
  106. NAMELIST PAS    Prints interface section
  107. NAMETYPE PAS    Type definitions for NAMELIST
  108. BLOCKS   PAS    Routines for code blocks, etc.
  109. SRCFILES PAS    Prints source files & line numbers
  110. RELOC    PAS    Prints relocation records
  111. CODE     PAS    Code and const dumper
  112.  
  113. DUMP     PAS    Various dump routines
  114. LOADER   PAS    Reads in .TPU and .TPL files
  115. UTIL     PAS    Various utility routines
  116. TEST1    PAS    Test file
  117. TEST1    INC    Test include file
  118. PARAMS   PAS    Parses parameters
  119.  
  120. THAT'S IT!
  121.  
  122.      Have fun with INTRFC and Turbo Pascal.  I'd like to hear of
  123. any novel uses.
  124.  
  125. D.J. Murdoch
  126.